{% load bootstrap3 %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>学习笔记</title>
    {% bootstrap_css %}
    {% bootstrap_javascript %}
</head>
<body>

    <!--定义导航栏 static navbar-->
    <nav class="navbar navbar-default navbar-static-top" >
        <div class="container" >
            <div class="navbar-header" >
                <button type="button" class="navbar-toggle collapsed "
                   data-toggle='collapse' data-target='#navbar'
                   aria-expanded="false" aria-controls="navbar" >
                </button>
                <a href="{% url 'learing_logs:index' %}" class="navbar-brand" >学习笔记</a>
            </div>

            <div id="navbar" class="navbar-collapse collapse" >
                <ul class="nav navbar-nav">
                    <li><a href="{% url 'learing_logs:topics' %}">我的主题</a></li>
                    {% if user.is_authenticated %}
                        <li><a href="{% url 'learing_logs:blogs' user.id %}">我的博客</a></li>
                    {% endif %}                    
                </ul>

                <ul class="nav navbar-nav navbar-right" >
                    {% if user.is_authenticated %}
                        <li><a href="{% url 'users:user_inf' user.id %}">Hello,{{ user.username }}</a></li> 
                        <li><a href="{% url 'users:logout' %}">登出</a></li>
                    {% else %}
                        <li><a href="{% url 'users:login' %}">登录</a></li>
                        <li><a href="{% url 'users:register' %}">注册</a></li>                        
                    {% endif %}
                </ul>

            </div class='page-header' >
                {% block header %}{% endblock header%}
            <div>
            <div>
                {% block content %}{% endblock content%}
            </div>

            </div>

        </div>
    </nav>

    
</body>
</html>